/**
 * @author maulin
 */
dojo.provide("medryx.widgets._Census.CensusView");
dojo.require("dojox.grid.DataGrid");
dojo.require("medryx.AbstractBase")

dojo.declare("medryx.widgets._Census.CensusView", medryx.AbstractBase, {
	
	$getStore:null,
	$getQuery:null,
	columns:[[{
        name: 'Ward',
        field: "ward",
        autoFilter: true,
        width: '30px',
        tooltip: "Left-click to sort, Right-click to filter by Nursing Unit."
    }, {
        name: 'Room',
        field: "room",
        width: '50px'
    }, {
        name: 'Patient',
        field: "name",
        width: '150px',
        tooltip: "Double-click to login and view full patient names."
    }, {
        name: 'Team',
        field: "hospitalistTeam",
        autoFilter: true,
        width: '100px',
        tooltip: "Left-click to sort, Right-click to filter by Team."
    }, {
        name: 'PMU',
        field: "residentTeam",
        autoFilter: true,
        width: '75px'
    }]],
	
	postCreate:function() {
		this.grid = new dojox.grid.DataGrid({
			store:this.store,
			query:this.getQuery(),
			queryOptions:{
				properties:this.getProperties(),
				namedQuery:"AllPatients",
				entityClass:"Patient"
			},
			structure:this.getStructure()
		
		}, this.gridNode);
	},
	
	getStructure:function() {
		
	}
});
